home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: netcom.com!jodell
- From: jodell@netcom.com (Jake Odell)
- Subject: Re: How to make it BEEP ?
- Message-ID: <jodellDoJtqG.2DK@netcom.com>
- Organization: NETCOM On-line Communication Services (408 261-4700 guest)
- X-Newsreader: TIN [version 1.2 PL1]
- References: <4ihuuh$6ul@hatathli.csulb.edu> <4in0ih$o43@zeus.intellinet.com> <4in5r1$j90@druid.borland.com> <4inmv1$ljj@sunburst.ccs.yorku.ca>
- Date: Wed, 20 Mar 1996 04:27:52 GMT
- Sender: jodell@netcom21.netcom.com
-
- Shahed A. Quazi (cs942112@ariel.cs.yorku.ca) posted:
- # Hi,
-
- # I was wondering if anyone would be kind enough to tell me if there is a
- # C function on unix that I can use to make a beep sound. If it's not
- # there,I would really appreciate if someone could give me the code.
-
- Depending on your compiler, this may work:
-
- #include <stdio.h>
- main()
- { printf("\a"); /* alarm sound */
- fflush(stdout);
- return 0;
- }
-
- With SunOS cc, it prints 'a', with gcc, it beeps.
-
- # Actually, I'm writing a very simple program where I need it to beep if
- # the user enters the input in wrong format.
-
- # Thanks.
-
- # --------------------------------
- # Shahed A. Quazi
- # York University, Toronto, Canada.
- # http://www.yucc.yorku.ca/~shahed
-
- --
- jake@pantheon.us.com jodell@netcom.com
-